package com.store.orm.execute;

import com.mongodb.client.MongoDatabase;
import com.store.orm.mongo.curd.Delete;
import com.store.orm.mongo.curd.Insert;
import com.store.orm.mongo.curd.Select;
import com.store.orm.mongo.curd.Update;
import com.store.orm.mongo.curd.impl.MongoDelete;
import com.store.orm.mongo.curd.impl.MongoInsert;
import com.store.orm.mongo.curd.impl.MongoSelect;
import com.store.orm.mongo.curd.impl.MongoUpdate;

/**
 * @author 宫静雨
 * @version 1.0
 */
public class MongoFactory {

    private MongoDatabase mongoDatabase;

    public MongoFactory(MongoDatabase mongoDatabase) {
        this.mongoDatabase = mongoDatabase;
    }

    public Insert insert() {
        return new MongoInsert(mongoDatabase);
    }

    public Update update() {
        return new MongoUpdate(mongoDatabase);
    }

    public Delete delete() {
        return new MongoDelete(mongoDatabase);
    }

    public Select select() {
        return new MongoSelect(mongoDatabase);
    }

}